<%@ page language="java" import="java.util.*" contentType="text/html;charset=utf-8" isELIgnored="false" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"  prefix="c" %>
<%
	String path=request.getContextPath();
	session.setAttribute("path",path);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>控制台页面_企业工资管理系统</title>
<link rel="stylesheet" href="${path}/resources/css/style.default.css" type="text/css"/>
<link rel="stylesheet" href="${path}/resources/css/print.css" type="text/css" media="print"/>

<script type="text/javascript" src="${path}/resources/js/plugins/jquery-1.7.min.js"></script>
<script type="text/javascript" src="${path}/resources/js/plugins/jquery.cookie.js"></script>
<script type="text/javascript" src="${path}/resources/js/plugins/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="${path}/resources/js/plugins/jquery-ui-1.8.16.custom.min.js"></script>
<script type="text/javascript" src="${path}/resources/js/plugins/ui.spinner.min.js"></script>
<script type="text/javascript" src="${path}/resources/js/plugins/jquery.jgrowl.js"></script>
<script type="text/javascript" src="${path}/resources/js/plugins/jquery.alerts.js"></script>
<script type="text/javascript" src="${path}/resources/js/jquery.PrintArea.js"></script>
<script type="text/javascript" src="${path}/resources/js/general.js"></script>
<script type="text/javascript" src="${path}/resources/js/salaryRecord.js"></script>
<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="js/plugins/excanvas.min.js"></script><![endif]-->
<!--[if IE 9]>
    <link rel="stylesheet" media="screen" href="css/style.ie9.css"/>
<![endif]-->
<!--[if IE 8]>
    <link rel="stylesheet" media="screen" href="css/style.ie8.css"/>
<![endif]-->
<!--[if lt IE 9]>
	<script src="js/plugins/css3-mediaqueries.js"></script>
<![endif]-->

<style>
.stdform{
	align:center;
}
.stdform label {
	width:80px;
	text-align:center;
	padding:0px
}
.stdform span.field, .stdform div.field {
	margin-left:80px
}

.stdform .formwrapper {
	margin-left:80px
}

#salaryRecordDetail {
	display:none;
	height:auto;
}
.stdform p {
	width:70%
}

@media print {
.noprint { display: none;color:green }
} 	
	
 
</style>
</head>

<body class="withvernav">
<div class="bodywrapper">
   <div class="topheader">
			<div class="left">
				<h1 class="logo">
					企业<span>工资管理系统</span>
				</h1>
				<br clear="all" />
			</div>
			<!--left-->

			<div class="right">
				<div class="userinfo">
					<img src="${path}/resources/images/thumbs/avatar.png" alt="" />
					<span> ${employee.empNo}</span>
				</div>
				<!--userinfo-->

				<div class="userinfodrop">
					<div class="avatar">
						<a href=""><img src="${path}/resources/images/thumbs/avatarbig.png" alt="" /></a>
						<div class="changetheme">
							切换主题: <br /> <a class="default"></a> <a class="blueline"></a> <a
								class="greenline"></a> <a class="contrast"></a> <a
								class="custombg"></a>
						</div>
					</div>
					<!--avatar-->
					<div class="userdata">
						<h4>${employee.empName}</h4>
						<span class="email">${employee.empEmail}</span>
						<ul>
							<li><a href="${path}/employee/editProfile">编辑资料</a></li>
							<li><a href="${path}/employee/password">修改密码</a></li>
							<li><a href="#">帮助</a></li>
							<li><a href="${path}/employee/logout">退出</a></li>
						</ul>
					</div>
					<!--userdata-->
				</div>
				<!--userinfodrop-->
			</div>
			<!--right-->
		</div>
		<!--topheader-->


		<div class="header">
			<ul class="headermenu">
				<li><a href="${path}/employee/profile"><span
						class="icon icon-flatscreen"></span>首页</a></li>
				<li><a href="${path}/department"><span
						class="icon icon-pencil"></span>部门信息管理</a></li>
				<li><a href="${path}/post"><span
						class="icon icon-message"></span>岗位信息管理</a></li>
				<li><a href="${path}/employee"><span
						class="icon icon-pencil"></span>员工信息管理</a></li>
				<c:if test="${employee.isAdmin == 1 }">
				<li><a href="${path}/timecard"><span
						class="icon icon-speech"></span>考勤信息管理</a></li>
				</c:if>
				<c:if test="${employee.isAdmin == 0 }">
				<li><a href="${path}/timecard/myTimecards"><span
						class="icon icon-speech"></span>考勤信息管理</a></li>
				</c:if>
				<li><a href="${path}/bonus"><span 
						class="icon icon-chart"></span>奖金信息管理</a></li>
				<li  class="current"><a href="${path}/salaryRecord"><span 
						class="icon icon-message"></span>工资信息管理</a></li>
			</ul>
		</div>
		<!--header-->

		<div class="vernav2 iconmenu">
			<ul>
				<li><a href="${path}/department" class="widgets">部门信息管理</a></li>
	        	<li><a href="${path}/post" class="support">岗位信息管理</a></li>
	            <li><a href="${path}/employee" class="tables">员工信息管理</a></li>
	            <li><a href="#attend" class="calendar">考勤信息管理</a>
	            	<span class="arrow"></span>
	            	<ul id="attend">
	            		<c:if test="${employee.isAdmin == 1 }">
	               		<li><a href="${path}/timecard">考勤-日历模式</a></li>
	               		</c:if>
	               		<c:if test="${employee.isAdmin == 0 }">
	               		<li><a href="${path}/timecard/myTimecards">考勤-日历模式</a></li>
	               		</c:if>
	                    <li><a href="${path}/timecard/table">考勤-表格模式</a></li>
	                </ul>
            	</li>
	            <li><a href="${path}/bonus" class="tables">奖金信息管理</a>
	            </li>
	            <li  class="current"><a href="#salary" class="widgets">工资信息管理</a>
	            	<span class="arrow"></span>
	            	<ul id="salary">
	            		<c:if test="${employee.isAdmin == 1 }">
	            		 <li><a href="${path}/salaryRecord/calPre">工资结算</a></li>
	            		 </c:if>
	                    <li  class="current"><a href="${path}/salaryRecord">工资记录</a></li>
	                    <c:if test="${employee.isAdmin == 1 }">
	                    <li><a href="${path}/postSalary">工资结构调整</a></li>
	                    </c:if>
	                    <c:if test="${employee.isAdmin == 0 }">
	                    <li><a href="${path}/postSalary/myStructure">我的工资结构</a></li>
	                    </c:if>
	                </ul>
            	</li>
        	</ul>
			<a class="togglemenu"></a> <br />
			<br />
		</div>
		<!--leftmenu-->
        
    <div class="centercontent">
    	<div style="margin-left:20px;margin-top:20px;">
    		<form action="/salaryRecord/exportRecords" method="post">
               <button id="calSalaryBtn" class="submit radius2 order_btn" style="width:100px;margin-right:20px">导出Excel</button>
     		</form>
     	 </div>
    	<div id="salaryRecordDetail" class="subcontent">
			<div class="stdform">
				<div class="contenttitle2" style="margin-left: 200px; max-height:600px">
					<h2>工资明细</h2>
				</div>
				<br/>
				<div style="margin-right:10px; margin-left:350px">
					<b>员工:</b><span style="margin-left:5px" id="emp">陈旭伟</span>
					<b style="margin-left:10px">工资月份:</b><span style="margin-left:5px" id="recordTime">2015-5</span>
				</div>
				
				<br/>
				<div class="contenttitle2" style="margin-left: 20px">
					<h3>基本工资</h3>
				</div>
					<table style="width: 100%">
					<tr>
						<td>
							<p>
								<label>基本工资:</label> <span class="field" id="basicSalary">￥5000.0</span>
							</p>
						</td>
					</tr>
					</table>
				<div class="contenttitle2" style="margin-left: 20px">
					<h3>五险一金</h3>
				</div>
				<table style="width: 100%">
					<tr>
						<td>
							<p>
								<label>养老保险:</label> <span class="field" id="endowmentMoney"></span>
							</p>
						</td>
						<td>
							<p>
								<label>医疗保险:</label> <span class="field" id="medicareMoney"></span>
							</p>
						</td>
						<td>
							<p>
								<label>工伤保险:</label> <span class="field" id="injuryMoney"></span>
							</p>
						</td>
					</tr>
					<tr>
						
						<td>
							<p>
								<label>生育保险:</label> <span class="field" id="birthMoney"></span>
							</p>
						</td>
						<td>
							<p>
								<label>失业保险:</label> <span class="field" id="unemploymentMoney"></span>
							</p>
						</td>
						<td>
							<p>
								<label>住房公积金:</label> <span class="field" id="housingMoney"></span>
							</p>
						</td>
					</tr>
				</table>
				<div class="contenttitle2" style="margin-left: 20px">
					<h3>考勤信息</h3>
				</div>
				<table style="width: 100%">
					<tr>
						<td>
							<p>
								<label>出差补助:</label> <span class="field" id="travelMoney"></span>
							</p>
						</td>
						<td>
							<p>
								<label>加班奖金:</label> <span class="field" id="extraWorkMoney"></span>
							</p>
						</td>
						<td>
							<p>
								<label>请假扣除:</label> <span class="field" id="leaveMoney"></span>
							</p>
						</td>
					</tr>
					<tr>
						<td>
							<p>
								<label>迟到罚金:</label> <span class="field" id="lateMoney"></span>
							</p>
						</td>
						<td>
							<p>
								<label>旷工罚金:</label> <span class="field" id="neglectWorkMoney"></span>
							</p>
						</td>
						<td>
						</td>
					</tr>
				</table>
				
				
				<br/>
				<div class="contenttitle2" style="margin-left: 20px">
					<h3>奖金信息</h3>
				</div>
					<table style="width: 100%">
					<tr>
						<td>
							<p>
								<label>奖金金额:</label> <span class="field" id="bonus">￥5000.0</span>
							</p>
						</td>
					</tr>
					</table>
				<div class="contenttitle2" style="margin-left: 200px">
					<h3 id="totalMoney">总金额:￥10000</h3>
				</div>
				<button class="stdbtn btn_yellow noshow" style="width:100px;margin-right:20px;float:right" id="print">打印</button>
				</div>
			</div>
			
        
        <div id="contentwrapper" class="contentwrapper">
        	
                <table cellpadding="0" cellspacing="0" border="0" class="stdtable" id="salaryRecordTable">
                    <colgroup>
                    	<col class="con1" width="5%"/>
                        <col class="con0" width="9%"/>
                        <col class="con1" width="9%"/>
                        <col class="con0" width="9%"/>
                        <col class="con1" width="9%"/>
                        <col class="con0" width="9%"/>
                        <col class="con1" width="9%"/>
                        <col class="con0" width="9%"/>
                        <col class="con1" width="12%"/>
                        <col class="con0" width="9%"/>
                        <col class="con1"/>
                    </colgroup>
                    <thead>
                        <tr>
                        	<th class="head1">编号</th>
                            <th class="head0">员工编号</th>
                            <th class="head1">员工姓名</th>
                            <th class="head0">基本工资</th>
                            <th class="head1">五险一金</th>
                            <th class="head0">考勤工资</th>
                            <th class="head1">奖金</th>
                            <th class="head0">总工资</th>
                            <th class="head1">工资月份（年-月）</th>
                            <th class="head0">发放日期</th>
                            <th class="head1">操作</th>
                        </tr>
                    </thead>
                    
                    <tbody>
                    	<c:forEach items="${records}" var="record" varStatus="status">
                    		<tr class="gradeA">
                    		<td>${status.index + 1}</td>
                            <td>${record.empNo}</td>
                            <td>${record.empName}</td>
                            <td>${record.basicSalary}</td>
                            <td>${record.insurance}</td>
                            <td>${record.attendence}</td>
                            <td>${record.bonus}</td>
                            <td>${record.total}</td>
                            <td>${record.recordTime}</td>
                            <td>${record.payDate}</td>
							<td><a class="btn btn_link" onclick="showEditDialog(${record.recordId},'${record.empName}')"><span>明细</span></a>
                            </td>
                        	</tr>
                    	</c:forEach>
                    </tbody>
                </table>
                
          <br /><br />
        	
        </div><!--contentwrapper-->
        
        <br clear="all" />
        
	</div><!-- centercontent -->
</div><!--bodywrapper-->
</body>
</html>
